// SupportHangerManager.h: interface for the SupportHangerManager class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SUPPORTHANGERMANAGER_H__57EA2410_51E9_4D60_835E_E0486FE46B96__INCLUDED_)
#define AFX_SUPPORTHANGERMANAGER_H__57EA2410_51E9_4D60_835E_E0486FE46B96__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ManagerTemplate.h"
#include "SupportHanger.h"
#include "ProjectSubObject.h"

SupportHanger* Convert(SupportHanger* p, const ObjectId& id);

INLINE BOOL TypeCast(const UeObjectId& i, SupportHanger*& o)
{
	o = Convert(o, i);
	return TRUE;
}

class AFX_EXT_CLASS SupportHangerManager : 
public ReferenceManager<CString, UeObjectId , SupportHanger*> , public ProjectSubObject
{
public:
	SupportHangerManager();
	virtual ~SupportHangerManager();

public:
	SupportHanger* GetSupportHanger(const CString& strSHID, 
		const CString& strVolumeID = CString(), const CString& strPrjID = CString());
	SupportHanger* GetSupportHanger(const SupportHangerPoint& pt);

	void AddSupportHanger(SupportHanger* pSH);
	CString SupportHangerIndex();

	void CurSupportHanger(SupportHanger* pSH){
		m_pCurHanger = pSH;
	}

	SupportHanger* CurSupportHanger() const {
		return m_pCurHanger;
	}

private:
	SupportHanger* NewSupportHanger(const CString& strSHID,
		const CString& strVolumeID, const CString& strPrjID);

private:
	SupportHanger* m_pCurHanger;
};

#endif // !defined(AFX_SUPPORTHANGERMANAGER_H__57EA2410_51E9_4D60_835E_E0486FE46B96__INCLUDED_)
